3.22.48 \(\int \frac {(5-x) (3+2 x)^2}{(2+5 x+3 x^2)^2} \, dx\)

Optimal. Leaf size=38 \[ -\frac {587 x+533}{9 \left (3 x^2+5 x+2\right )}+59 \log (x+1)-\frac {535}{9} \log (3 x+2) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {816, 1660, 632, 31} \begin {gather*} -\frac {587 x+533}{9 \left (3 x^2+5 x+2\right )}+59 \log (x+1)-\frac {535}{9} \log (3 x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^2,x]

[Out]

-(533 + 587*x)/(9*(2 + 5*x + 3*x^2)) + 59*Log[1 + x] - (535*Log[2 + 3*x])/9

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 816

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[(a
 + b*x + c*x^2)^p*ExpandIntegrand[(d + e*x)^m*(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2
- 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && ILtQ[p, -1] && IGtQ[m, 0] && RationalQ[a, b, c, d, e, f, g]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {(5-x) (3+2 x)^2}{\left (2+5 x+3 x^2\right )^2} \, dx &=\int \frac {45+51 x+8 x^2-4 x^3}{\left (2+5 x+3 x^2\right )^2} \, dx\\ &=-\frac {533+587 x}{9 \left (2+5 x+3 x^2\right )}-\int \frac {\frac {181}{3}+\frac {4 x}{3}}{2+5 x+3 x^2} \, dx\\ &=-\frac {533+587 x}{9 \left (2+5 x+3 x^2\right )}+177 \int \frac {1}{3+3 x} \, dx-\frac {535}{3} \int \frac {1}{2+3 x} \, dx\\ &=-\frac {533+587 x}{9 \left (2+5 x+3 x^2\right )}+59 \log (1+x)-\frac {535}{9} \log (2+3 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 38, normalized size = 1.00 \begin {gather*} -\frac {587 x+533}{27 x^2+45 x+18}-\frac {535}{9} \log (-6 x-4)+59 \log (-2 (x+1)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^2,x]

[Out]

-((533 + 587*x)/(18 + 45*x + 27*x^2)) - (535*Log[-4 - 6*x])/9 + 59*Log[-2*(1 + x)]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(5-x) (3+2 x)^2}{\left (2+5 x+3 x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^2,x]

[Out]

IntegrateAlgebraic[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 53, normalized size = 1.39 \begin {gather*} -\frac {535 \, {\left (3 \, x^{2} + 5 \, x + 2\right )} \log \left (3 \, x + 2\right ) - 531 \, {\left (3 \, x^{2} + 5 \, x + 2\right )} \log \left (x + 1\right ) + 587 \, x + 533}{9 \, {\left (3 \, x^{2} + 5 \, x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^2,x, algorithm="fricas")

[Out]

-1/9*(535*(3*x^2 + 5*x + 2)*log(3*x + 2) - 531*(3*x^2 + 5*x + 2)*log(x + 1) + 587*x + 533)/(3*x^2 + 5*x + 2)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 36, normalized size = 0.95 \begin {gather*} -\frac {587 \, x + 533}{9 \, {\left (3 \, x + 2\right )} {\left (x + 1\right )}} - \frac {535}{9} \, \log \left ({\left | 3 \, x + 2 \right |}\right ) + 59 \, \log \left ({\left | x + 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^2,x, algorithm="giac")

[Out]

-1/9*(587*x + 533)/((3*x + 2)*(x + 1)) - 535/9*log(abs(3*x + 2)) + 59*log(abs(x + 1))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 32, normalized size = 0.84 \begin {gather*} -\frac {535 \ln \left (3 x +2\right )}{9}+59 \ln \left (x +1\right )-\frac {425}{9 \left (3 x +2\right )}-\frac {6}{x +1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5-x)*(2*x+3)^2/(3*x^2+5*x+2)^2,x)

[Out]

-425/9/(3*x+2)-535/9*ln(3*x+2)-6/(x+1)+59*ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 34, normalized size = 0.89 \begin {gather*} -\frac {587 \, x + 533}{9 \, {\left (3 \, x^{2} + 5 \, x + 2\right )}} - \frac {535}{9} \, \log \left (3 \, x + 2\right ) + 59 \, \log \left (x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^2,x, algorithm="maxima")

[Out]

-1/9*(587*x + 533)/(3*x^2 + 5*x + 2) - 535/9*log(3*x + 2) + 59*log(x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 30, normalized size = 0.79 \begin {gather*} 59\,\ln \left (x+1\right )-\frac {535\,\ln \left (x+\frac {2}{3}\right )}{9}-\frac {\frac {587\,x}{27}+\frac {533}{27}}{x^2+\frac {5\,x}{3}+\frac {2}{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((2*x + 3)^2*(x - 5))/(5*x + 3*x^2 + 2)^2,x)

[Out]

59*log(x + 1) - (535*log(x + 2/3))/9 - ((587*x)/27 + 533/27)/((5*x)/3 + x^2 + 2/3)

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 31, normalized size = 0.82 \begin {gather*} - \frac {587 x + 533}{27 x^{2} + 45 x + 18} - \frac {535 \log {\left (x + \frac {2}{3} \right )}}{9} + 59 \log {\left (x + 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)**2/(3*x**2+5*x+2)**2,x)

[Out]

-(587*x + 533)/(27*x**2 + 45*x + 18) - 535*log(x + 2/3)/9 + 59*log(x + 1)

________________________________________________________________________________________